package com.ag.zrt.action;

import javax.annotation.Resource;

import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.ag.bean.TbInformation;
import com.ag.common.BaseAction;
import com.ag.zrt.service.InformationService;
@Controller("watchInformationAction")
@Scope(BeanDefinition.SCOPE_PROTOTYPE)
public class WatchInformationAction extends BaseAction {

	/**
	 * 
	 */
	private static final long serialVersionUID = 5312795982431775498L;
	@Resource(name="InformationService")
	private InformationService informationService;
	private String id;
	private TbInformation information;

	public TbInformation getInformation() {
		return information;
	}

	@Override
	public String execute() throws Exception {
		// TODO Auto-generated method stub
		try{
			information = informationService.findById(id);
		} catch(Exception e){
			e.printStackTrace();
		}
		return "watch_info_succ";
	}

	public void setInformation(TbInformation information) {
		this.information = information;
	}

	public void setInformationService(InformationService informationService) {
		this.informationService = informationService;
	}

	public void setId(String id) {
		this.id = id;
	}

}
